import { getItem, setItem } from '@/utils/auth'
const TOUTIAO_TOKEN = 'toutiao_token'
const state = {
  user: getItem(TOUTIAO_TOKEN)
}
const mutations = {
  setUser(state, data) {
    state.user = data
    setItem(TOUTIAO_TOKEN, data)
  }
}
const getters = {}
export default {
  namespaced: true,
  state,
  mutations,
  getters
}
